/**
 * Created by Administrator on 2015/4/28.
 */
define(['jquery'], function($){
    //使用css3 transition 属性时 要先给DOM元素设置相应的属性，不然会无效()
    //$('.searchBox').width($('.searchBox').width());
    var $searchBox = $('.searchBox_no');
    $searchBox.attr('data-width', $searchBox.width());
    $searchBox.css('width', $searchBox.width());
    $searchBox.on('focus', function (event) {
        var $that = $(event.target);
        //$that.addClass('searchBox-focus');
        $that.animate({width: 250}, 0);
    }).on('blur', function (event) {
        var $that = $(event.target),
            width = $that.attr('data-width');
        //$that.removeClass('searchBox-focus');
        $that.animate({width: width}, 0);
    });

});

